import request from '@/utils/request'

// 查询[题库]列表
export function listquestionStore(query) {
  return request({
    url: '/system/questionStore/list',
    method: 'get',
    params: query
  })
}

// 查询[题库]详细
export function getquestionStore(id) {
  return request({
    url: '/system/questionStore/' + id,
    method: 'get'
  })
}

// 新增[题库]
export function addquestionStore(data) {
  data.content=encodeURIComponent(data.content);
  data.options=encodeURIComponent(data.options)
  return request({
    url: '/system/questionStore',
    method: 'post',
    data: data
  })
}

// 修改[题库]
export function updatequestionStore(data) {
  data.content=encodeURIComponent(data.content);
  data.options=encodeURIComponent(data.options)
  return request({
    url: '/system/questionStore',
    method: 'put',
    data: data
  })
}

// 删除[题库]
export function delquestionStore(id) {
  return request({
    url: '/system/questionStore/' + id,
    method: 'delete'
  })
}

// 导出[题库]
export function exportquestionStore(query) {
  return request({
    url: '/system/questionStore/export',
    method: 'get',
    params: query
  })
}



// 获取章节下拉
export function getCourseCat() {
  return request({
    url: '/system/course/courseist',
    method: 'get'
  })
}